1. Field of the Invention
The present invention relates to an intra prediction apparatus used in moving picture compression and the like, and to technology for reducing an amount of computation for intra prediction which is one approach to moving picture compression.
2. Description of the Related Art
In recent years, through the spread of communication infrastructures such as broadband, and through the drop in cost of personal computers, high-volume recording apparatuses such as HDD and DVD, memory cards, and so on, an environment in which general consumers edit, store, transmit, and carry video has been established, and the number of users is expanding.
While situations in which general consumers handle video increase, there are also situations where personal computers do not have a level of performance that is sufficient for handling video, even in the present age of high-performance personal computers. For example, the information amount of video is extremely high, and it takes a significant amount of time to execute moving picture compression even when using a high-performance personal computer. Increasing the computational efficiency by processing using the same encoding performance but with a smaller computation amount can be considered as a solution to this. Additionally, the execution of highly efficient computation can be linked to a reduction in consumed power, and in a portable filming device, constraints placed on filming time by battery life can be relaxed. With this in mind, highly efficient moving picture compression technology is becoming more and more necessary.
Amid this, the newly-developed international moving picture compression standard H.264 (for example, see Non-Patent Reference Document 1, “H264 Advanced video coding for generic audiovisual services,” Triceps) uses a plurality of moving picture compression tools with the aim of improving picture quality and encoding efficiency. Additionally, H.264 has a feature of sequentially comparing a plurality of prediction methods, selecting a prediction method with an advanced coding efficiency, and executing coding.
For example, in the case where coding is executed in a 16×16 pixel macroblock included in the Intra Coded Picture (I-picture) shown in FIG. 1, intra prediction is executed from a plurality of directions in each block of 4×4 pixels in the macroblock divided into 16 pixels, as well as being executed from a plurality of directions in the macroblock.
The 4×4 intra prediction, which is that representative example, selects the prediction method with the highest encoding efficiency by comparing a plurality of prediction methods.
In that prediction method, as shown in FIG. 2, there are 9 modes in all: a prediction mode 0 (vertical) in which a predicted pixel value is calculated from an above macroblock (MB) and the pixel value is predicted in a vertical direction; a prediction mode 1 (horizontal) in which a predicted pixel value is calculated from an adjacent MB and the pixel value is predicted in a horizontal direction; a prediction mode 8 (horizontal-up), a prediction mode 6 (horizontal down), and a prediction mode 4 (diagonal-down-right), in which a predicted pixel value is calculated from an adjacent MB and the pixel value is predicted respectively in a direction shifted ±22.5 degrees and −44.5 degrees from the horizontal; a prediction mode 5 (vertical right), a prediction mode 7 (vertical-left), and a prediction mode 3 (diagonal-down-left), in which a predicted pixel value is calculated from an adjacent MB and the pixel value is predicted in a direction shifted ±22.5 degrees and −44.5 degrees from the vertical; as well as a prediction mode 2 (DC) in which prediction is executed from an average in pixel values from adjacent MBs.
In the same manner, 16×16 intra prediction also has a plurality of prediction methods. In this 16×16 intra prediction, there are 4 modes of the same type of prediction method.
For 16×16 intra prediction, as shown in FIG. 3, there is a prediction mode 0 (vertical), a prediction mode 1 (horizontal), a prediction mode 2 (DC), and a prediction mode 3 (plane).
Because of this, as shown in FIG. 4, when an I-picture is inputted in a conventional intra prediction apparatus, a prediction error (absolute value difference sum) in the 9 paths of prediction modes in block 0 is calculated. In other words, in the 9 types of prediction modes, a differential value between a pixel to be encoded and a reference pixel, and an absolute value difference sum, are all calculated. Then, the intra prediction apparatus uses the mode with the lowest prediction error as the intra prediction.
When the intra prediction in block 0 finishes, the intra prediction apparatus repeats the same processing as mentioned above, and executes intra prediction in block 1 to block 15.
When the intra prediction in block 15 finishes, a differential value between a pixel to be encoded and a reference pixel, and an absolute value difference sum, are all calculated in the 4 types of prediction modes in that macroblock. Then, the intra prediction apparatus uses the mode with the lowest prediction error as the intra prediction; in other words, for example, the smaller of i) the total of the absolute value difference sum of each block and ii) the absolute value difference sum of the macroblock. That is to say, in the case where the total of the absolute value difference sum of each block is smaller, the intra prediction apparatus outputs a difference value for each block. On the other hand, in the case where the absolute value difference sum of the macroblock is smaller, the intra prediction apparatus outputs a difference value for the macroblock.
Data compression of the I-picture is executed in this manner.
However, as the abovementioned examples show, in a conventional intra prediction apparatus, overhead and computation load are large, because in the H.264 intra prediction that is the international standard moving picture compression format currently disclosed, a predictive picture is created through a plurality of prediction methods (9 types in 4×4 intra prediction, and 4 types in 16×16 intra prediction) for increasing picture quality, and an optimum prediction method is selected from a variety of prediction methods; in other words, because the processing with a high encoding efficiency is selected when executing encoding, an increase in the amount of encoding computation cannot be avoided while increasing picture quality and encoding efficiency.
Because of this, a reduction in the amount of encoding computation of H.264, which has advanced picture quality, is currently in demand in order to realize a moving picture compression technology with high picture quality and high efficiency.